3.7.32 \(\int \log (c (d+\frac {e}{f+g x})^q) \, dx\) [632]

Optimal. Leaf size=45 \[ \frac {(f+g x) \log \left (c \left (d+\frac {e}{f+g x}\right )^q\right )}{g}+\frac {e q \log (e+d (f+g x))}{d g} \]

[Out]

(g*x+f)*ln(c*(d+e/(g*x+f))^q)/g+e*q*ln(e+d*(g*x+f))/d/g

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2533, 2498, 269, 31} \begin {gather*} \frac {(f+g x) \log \left (c \left (d+\frac {e}{f+g x}\right )^q\right )}{g}+\frac {e q \log (d (f+g x)+e)}{d g} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Log[c*(d + e/(f + g*x))^q],x]

[Out]

((f + g*x)*Log[c*(d + e/(f + g*x))^q])/g + (e*q*Log[e + d*(f + g*x)])/(d*g)

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 269

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(m + n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b, m
, n}, x] && IntegerQ[p] && NegQ[n]

Rule 2498

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)], x_Symbol] :> Simp[x*Log[c*(d + e*x^n)^p], x] - Dist[e*n*p, Int[
x^n/(d + e*x^n), x], x] /; FreeQ[{c, d, e, n, p}, x]

Rule 2533

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*((f_.) + (g_.)*(x_))^(n_))^(p_.)]*(b_.))^(q_.), x_Symbol] :> Dist[1/g, Su
bst[Int[(a + b*Log[c*(d + e*x^n)^p])^q, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && IGtQ[q
, 0] && (EqQ[q, 1] || IntegerQ[n])

Rubi steps

\begin {align*} \int \log \left (c \left (d+\frac {e}{f+g x}\right )^q\right ) \, dx &=\frac {\text {Subst}\left (\int \log \left (c \left (d+\frac {e}{x}\right )^q\right ) \, dx,x,f+g x\right )}{g}\\ &=\frac {(f+g x) \log \left (c \left (d+\frac {e}{f+g x}\right )^q\right )}{g}+\frac {(e q) \text {Subst}\left (\int \frac {1}{\left (d+\frac {e}{x}\right ) x} \, dx,x,f+g x\right )}{g}\\ &=\frac {(f+g x) \log \left (c \left (d+\frac {e}{f+g x}\right )^q\right )}{g}+\frac {(e q) \text {Subst}\left (\int \frac {1}{e+d x} \, dx,x,f+g x\right )}{g}\\ &=\frac {(f+g x) \log \left (c \left (d+\frac {e}{f+g x}\right )^q\right )}{g}+\frac {e q \log (e+d (f+g x))}{d g}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 56, normalized size = 1.24 \begin {gather*} \frac {-d f q \log (f+g x)+(e+d f) q \log (e+d f+d g x)+d g x \log \left (c \left (d+\frac {e}{f+g x}\right )^q\right )}{d g} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Log[c*(d + e/(f + g*x))^q],x]

[Out]

(-(d*f*q*Log[f + g*x]) + (e + d*f)*q*Log[e + d*f + d*g*x] + d*g*x*Log[c*(d + e/(f + g*x))^q])/(d*g)

________________________________________________________________________________________

Maple [A]
time = 0.05, size = 71, normalized size = 1.58

method result size
default \(\ln \left (c \left (\frac {d g x +d f +e}{g x +f}\right )^{q}\right ) x +e g q \left (\frac {\left (d f +e \right ) \ln \left (d g x +d f +e \right )}{e \,g^{2} d}-\frac {f \ln \left (g x +f \right )}{g^{2} e}\right )\) \(71\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(c*(d+e/(g*x+f))^q),x,method=_RETURNVERBOSE)

[Out]

ln(c*((d*g*x+d*f+e)/(g*x+f))^q)*x+e*g*q*((d*f+e)/e/g^2/d*ln(d*g*x+d*f+e)-1/g^2/e*f*ln(g*x+f))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 67, normalized size = 1.49 \begin {gather*} -g q {\left (\frac {f e^{\left (-1\right )} \log \left (g x + f\right )}{g^{2}} - \frac {{\left (d f + e\right )} e^{\left (-1\right )} \log \left (d g x + d f + e\right )}{d g^{2}}\right )} e + x \log \left (c {\left (d + \frac {e}{g x + f}\right )}^{q}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(d+e/(g*x+f))^q),x, algorithm="maxima")

[Out]

-g*q*(f*e^(-1)*log(g*x + f)/g^2 - (d*f + e)*e^(-1)*log(d*g*x + d*f + e)/(d*g^2))*e + x*log(c*(d + e/(g*x + f))
^q)

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 70, normalized size = 1.56 \begin {gather*} \frac {d g q x \log \left (\frac {d g x + d f + e}{g x + f}\right ) - d f q \log \left (g x + f\right ) + d g x \log \left (c\right ) + {\left (d f q + q e\right )} \log \left (d g x + d f + e\right )}{d g} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(d+e/(g*x+f))^q),x, algorithm="fricas")

[Out]

(d*g*q*x*log((d*g*x + d*f + e)/(g*x + f)) - d*f*q*log(g*x + f) + d*g*x*log(c) + (d*f*q + q*e)*log(d*g*x + d*f
+ e))/(d*g)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 102 vs. \(2 (36) = 72\).
time = 0.65, size = 102, normalized size = 2.27 \begin {gather*} \begin {cases} x \log {\left (c \left (\frac {e}{f}\right )^{q} \right )} & \text {for}\: d = 0 \wedge g = 0 \\\frac {f \log {\left (c \left (\frac {e}{f + g x}\right )^{q} \right )}}{g} + q x + x \log {\left (c \left (\frac {e}{f + g x}\right )^{q} \right )} & \text {for}\: d = 0 \\x \log {\left (c \left (d + \frac {e}{f}\right )^{q} \right )} & \text {for}\: g = 0 \\\frac {f \log {\left (c \left (d + \frac {e}{f + g x}\right )^{q} \right )}}{g} + x \log {\left (c \left (d + \frac {e}{f + g x}\right )^{q} \right )} + \frac {e q \log {\left (d f + d g x + e \right )}}{d g} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(c*(d+e/(g*x+f))**q),x)

[Out]

Piecewise((x*log(c*(e/f)**q), Eq(d, 0) & Eq(g, 0)), (f*log(c*(e/(f + g*x))**q)/g + q*x + x*log(c*(e/(f + g*x))
**q), Eq(d, 0)), (x*log(c*(d + e/f)**q), Eq(g, 0)), (f*log(c*(d + e/(f + g*x))**q)/g + x*log(c*(d + e/(f + g*x
))**q) + e*q*log(d*f + d*g*x + e)/(d*g), True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 172 vs. \(2 (48) = 96\).
time = 8.94, size = 172, normalized size = 3.82 \begin {gather*} \frac {{\left (d f g e^{\left (-2\right )} - {\left (d f + e\right )} g e^{\left (-2\right )}\right )} {\left (d q e^{2} \log \left (-d + \frac {d g x + d f + e}{g x + f}\right ) + d e^{2} \log \left (c\right ) - \frac {{\left (d g x + d f + e\right )} q e^{2} \log \left (-d + \frac {d g x + d f + e}{g x + f}\right )}{g x + f} + \frac {{\left (d g x + d f + e\right )} q e^{2} \log \left (\frac {d g x + d f + e}{g x + f}\right )}{g x + f}\right )}}{d^{2} g^{2} - \frac {{\left (d g x + d f + e\right )} d g^{2}}{g x + f}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(d+e/(g*x+f))^q),x, algorithm="giac")

[Out]

(d*f*g*e^(-2) - (d*f + e)*g*e^(-2))*(d*q*e^2*log(-d + (d*g*x + d*f + e)/(g*x + f)) + d*e^2*log(c) - (d*g*x + d
*f + e)*q*e^2*log(-d + (d*g*x + d*f + e)/(g*x + f))/(g*x + f) + (d*g*x + d*f + e)*q*e^2*log((d*g*x + d*f + e)/
(g*x + f))/(g*x + f))/(d^2*g^2 - (d*g*x + d*f + e)*d*g^2/(g*x + f))

________________________________________________________________________________________

Mupad [B]
time = 0.18, size = 67, normalized size = 1.49 \begin {gather*} x\,\ln \left (c\,{\left (d+\frac {e}{f+g\,x}\right )}^q\right )-\frac {f\,q\,\ln \left (f+g\,x\right )}{g}+\frac {f\,q\,\ln \left (e+d\,f+d\,g\,x\right )}{g}+\frac {e\,q\,\ln \left (e+d\,f+d\,g\,x\right )}{d\,g} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(c*(d + e/(f + g*x))^q),x)

[Out]

x*log(c*(d + e/(f + g*x))^q) - (f*q*log(f + g*x))/g + (f*q*log(e + d*f + d*g*x))/g + (e*q*log(e + d*f + d*g*x)
)/(d*g)

________________________________________________________________________________________